package body v8.Class_Arguments is

   -------------------------
   -- Internal_Get_Length --
   -------------------------

   function Internal_Get_Length
     (This : Internal_Arguments)
      return int32_t
   is
   begin
      return This.length;
   end Internal_Get_Length;

   -----------------------
   -- Internal_Get_This --
   -----------------------

   function Internal_Get_This
     (This : Internal_Arguments)
      return uint32_t
   is
   begin
      return This.values + 1 * 4;
   end Internal_Get_This;

   -------------------------
   -- Internal_Get_Callee --
   -------------------------

   function Internal_Get_Callee
     (This : Internal_Arguments)
      return uint32_t
   is
   begin
      return This.implicit_args - 1 * 4;
   end Internal_Get_Callee;

   -------------------------
   -- Internal_Get_Holder --
   -------------------------

   function Internal_Get_Holder
     (This : Internal_Arguments)
      return uint32_t
   is
   begin
      return This.implicit_args - 2 * 4;
   end Internal_Get_Holder;

   ---------------------------
   -- Internal_Get_Argument --
   ---------------------------

   function Internal_Get_Argument
     (This : Internal_Arguments;
      i : uint32_t)
      return uint32_t
   is
   begin
      return This.values -  i * 4;
   end Internal_Get_Argument;

   --------------------------------
   -- Internal_Is_Construct_Call --
   --------------------------------

   function Internal_Is_Construct_Call
     (This : Internal_Arguments)
      return Boolean
   is
   begin
      return -This.is_construct_call;
   end Internal_Is_Construct_Call;

   -----------------------
   -- Internal_Get_Data --
   -----------------------

   function Internal_Get_Data
     (This : Internal_Arguments)
      return uint32_t
   is
   begin
      return This.implicit_args;
   end Internal_Get_Data;

end v8.Class_Arguments;
